package _14_lianxi;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Student {

	public static void main(String[] args) {
		Map<String, Student1> map = new HashMap<String, Student1>();
		Student1 s1 = new Student1(10001, "zz", 12, "河北");
		Student1 s2 = new Student1(10002, "qq", 13, "天津");
		Student1 s3 = new Student1(10003, "aa", 14, "上海");
		Student1 s4 = new Student1(10004, "ww", 16, "广州");
		Student1 s5 = new Student1(10005, "ee", 18, "廊坊");
		Student1 s6 = new Student1(10006, "rr", 13, "邢台");
		Student1 s7 = new Student1(10007, "ss", 16, "河南");
		Student1 s8 = new Student1(10008, "dd", 15, "福建");
		Student1 s9 = new Student1(10009, "ff", 15, "安徽");
		Student1 s10 = new Student1(10010, "gg", 17, "重庆");
		map.put("13052875632", s1);
		map.put("13453123452", s2);
		map.put("12346453125", s3);
		map.put("12343531232", s4);
		map.put("12345432345", s5);
		map.put("13543532354", s6);
		map.put("16453323453", s7);
		map.put("12345653245", s8);
		map.put("12345653233", s9);
		map.put("12345643283", s10);
		System.out.println("输入一个学生的电话号码 : ");
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		System.out.println("学生信息 : " + map.get(s));
	}

}

class Student1 {
	int id;
	String name;
	int age;
	String address;

	public Student1(int id, String name, int age, String address) {
		super();
		this.id = id;
		this.name = name;
		this.age = age;
		this.address = address;
	}

	@Override
	public String toString() {
		return " 编号 : " + id + ", 姓名=" + name + ", 年龄=" + age + ", 地址=" + address + "]";
	}

}